window.onload = function () {
  const title = document.querySelector('.title>span');
  const toRed = document.querySelector('.chgColor.red');
  const reset = document.querySelector('.chgColor.reset');
  const colorOrigin = '#' + ((Math.random() * 0xffffff) << 0).toString(16);
  
  toRed.onclick = () => {title.style.color = '#f00'};
  reset.onclick = () => {title.style.color = colorOrigin};
  title.style.color = colorOrigin;
};
